home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-06 | 2.5 KB | 103 lines | [TEXT/KAHL] |
- // -----------------------------------------------------------------------------
- // File : demoDialog.h
- // Date : August 24, 1994
- // Author : Jim Stout
- // Purpose : header file for demoDialog.c
- //
- // -----------------------------------------------------------------------------
- #define MAXFONTSIZES 5
- #define TABCNTL 3 // the DITL item number for the tabPanel CDEF
- #define STDCTLS 4 // OK, Cancel, Tab Control, Disable on all panels
-
- // the types of panels we demo
-
- enum {
- BUTTONS = 1,
- POPUPS,
- SPINNERS,
- DATETIME,
- HSLIDERS,
- VSLIDERS,
- PROGBARS,
- POPUPEXT
- };
-
- enum { // controls on the BUTTONS panel
- DISABLE = STDCTLS,
- CB1,
- CB2,
- CB3,
- CB4,
- RB1,
- RB2,
- RB3,
- RB4,
- TB1,
- TB2,
- TB3,
- TB4,
- PB1,
- PB2,
- FONTPOP,
- ST1,
- EDITSIZE,
- SIZEPOP,
- SETFONT
- };
- enum { // controls on the SPINNERS panel
- SPIN1 = STDCTLS+1,
- SPIN2,
- SPIN3,
- SPIN4,
- SPIN5,
- SPIN6,
- SPIN7,
- SPIN8,
- EDITSPIN,
- FRACTSPIN
- };
-
- #define RESET STDCTLS+14 // on DATETIME panel
-
-
- #define HSLIDER3 STDCTLS+3 // items on the HSLIDER panel
- #define HSLIDERVAL STDCTLS+6
-
- #define VSLIDER5 STDCTLS+5 // items on the VSLIDER panel
- #define VSLIDERVAL STDCTLS+7
-
- #define PROG9 STDCTLS+9 // controls on the PROGBARS panel
- #define SPIN10 STDCTLS+10
-
- // -----------------------------------------------------------------------------
- // public routines
- // -----------------------------------------------------------------------------
-
- extern void demoDialog (void);
- extern void comparePopup (void);
-
- // -----------------------------------------------------------------------------
- // local routines
- // -----------------------------------------------------------------------------
-
- static void processPanel (DialogPtr theDialog, short currPanel,
- short itemHit);
- static void savePanel (DialogPtr theDialog, short toPanel);
- static void restorePanel (DialogPtr theDialog, short toPanel);
-
- static pascal char filter (DialogPtr theDialog, EventRecord *theEvent,
- short *theItem);
- static pascal void trackSpin (ControlHandle c, short p);
- static pascal void trackSlider (ControlHandle c, short p);
- static pascal void fractSpin (ControlHandle c, short p);
-
- static void setNewFont (DialogPtr theDialog);
-
- static void changeFont (DialogPtr theDialog, short newFont,
- long newSize);
- static void adjustSizePopup (DialogPtr theDialog, long newSize);
-
- static short findSystemFont (DialogPtr theDialog);
-
- static pascal char filterCompare (DialogPtr theDialog, EventRecord *theEvent,
- short *theItem);